#include "stdio.h"

typedef void F1(void);

F1 f1;
F1 *f2;

void callfunc1(F1 f) {
    puts("calling callfunc1(F1)");
    printf("f:%p, *f:%p, &f:%p\n", f, *f, &f);
    putchar('\t'); f();
    putchar('\t'); (*f)();
    putchar('\t'); (**f)();
    //(&f)();  //error
}

void callfunc2(F1 *f) {
    puts("calling callfunc2(F1*)");
    printf("f:%p, *f:%p, &f:%p\n", f, *f, &f);
    putchar('\t'); (*f)();
    putchar('\t'); f();
}


void tf(void) {
    puts("calling tf...");
}

int main(void) {
    callfunc1(tf);
    callfunc2(&tf);
    callfunc2(tf);
    callfunc1(&tf);

    printf("tf == &tf: %d\n", tf == &tf);

    return 0;
}
